package com.controller;

import com.entity.TestStudent;
import com.service.TestStudentService;
import org.springframework.context.annotation.Import;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Project: tobe-better-coder
 * Package: com.controller
 *
 * @author : Mr.xu
 * @date : 2023/9/24 21:30
 */
@RestController
public class MyController {

    @Resource
    private TestStudentService testStudentService;

    @RequestMapping(value = "/queryById",method = RequestMethod.POST)
    public TestStudent getStudent(@RequestBody TestStudent testStudent){
        return testStudentService.queryBuId(testStudent);
    }

    @RequestMapping(value = "/updateById",method = RequestMethod.POST)
    public int updateById(@RequestBody TestStudent testStudent){
        return testStudentService.updateById(testStudent);
    }
}